package adapter;

import android.support.annotation.Nullable;
import android.view.View;
import bean.AreaBean;
import bean.SchoolBean;
import bean.TestBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dispatchapp.andlei.R;

import java.util.List;

/**
 * @author Andlei
 * @DATE 2019/1/21
 */
public class DeliveryAreaAdapter extends BaseQuickAdapter<AreaBean,BaseViewHolder> {

    public DeliveryAreaAdapter(int layoutResId, @Nullable List<AreaBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AreaBean item) {
        helper.setText(R.id.tv_area,item.getName());
        if(item.getStatus().equals("1")){
            helper.getView(R.id.img_select).setVisibility(View.VISIBLE);
        }else {
            helper.getView(R.id.img_select).setVisibility(View.GONE);
        }
        helper.addOnClickListener(R.id.img_look);
    }
}
